package day8;

public class Warplane extends Plane {
    private int bomb;

    public Warplane(double weight, double height, int bomb) {
        super(weight, height);
        this.bomb = bomb;
    }

    public int getBomb() {
        return bomb;
    }

    public void setBomb(int bomb) {
        this.bomb = bomb;
    }
    public void flight(){
        super.start();
        super.speedup();
        this.lowAltitudeFlight();
        super.landing();
    }
    public void lowAltitudeFlight(){
        System.out.println("低空飞行");
    }
    public void lanuch(){
        System.out.println("发射导弹");
        setBomb(getBomb()-1);
    }
    public void showinfo(){
        super.showinfo();
        System.out.println("载弹数"+getBomb()+"枚！");
    }
}
